package jee.boot.entity.system;

import jee.boot.common.annotation.Table;
import jee.boot.common.annotation.Transient;
import jee.boot.common.basic.DataEntity;

/**
 * 系统序列号
 */
@Table(name="st_serial_number")
public class SerialNumber extends DataEntity<SerialNumber> {
    /**
     * 类型
     */
    private String type;
    /**
     * 类别
     */
    private String category;
    /**
     * 当前的序列号
     */
    private String serialNumber;
    /**
     * 数据周期
     */
    private String dataCycle;
    /**
     * 版本号,用于乐观锁控制
     */
    private int version;
    /**
     * 旧版本号,用于乐观锁控制
     */
    @Transient
    private int oldVersion;
    /**
     * 序列号模板
     */
    @Transient
    private SerialNumberFormat serialNumberFormat;

    public SerialNumber() {
    }

    public SerialNumber(String id) {
        super(id);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getDataCycle() {
        return dataCycle;
    }

    public void setDataCycle(String dataCycle) {
        this.dataCycle = dataCycle;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public int getOldVersion() {
        return oldVersion;
    }

    public void setOldVersion(int oldVersion) {
        this.oldVersion = oldVersion;
    }

    public SerialNumberFormat getSerialNumberFormat() {
        return serialNumberFormat;
    }

    public void setSerialNumberFormat(SerialNumberFormat serialNumberFormat) {
        this.serialNumberFormat = serialNumberFormat;
    }
}
